import { Header } from "../components/header";
import '../css/common.scss'
import '../lib/jquery.min.js'
import { IndexModel } from '../models/index.js'

class Index {
  constructor() {
    this.$app = $('<div id="app"></div>')
    this.init()
  }
  init() {
    this.render()
    this.getDatas()
  }
  render() {
    new Header(this.$app).init()
    $('body').prepend(this.$app)
  }
  async getDatas() {
    const indexModel = new IndexModel()
    let res = await indexModel.getDatas({
      swiper:this.swiper || true,
      phone:this.phone || true,
      field:this.field || true
    })
    console.log(res);
  }
}

// console.log($); 
new Index($)